/*
 * This file is part of TradeHelper library.
 *
 * TradeHelper library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * TradeHelper library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with TradeHelper library.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.rag.managers;

import com.alee.managers.settings.SettingsManager;
import com.alee.utils.XmlUtils;
import com.rag.core.*;

/**
 * User: mgarin Date: 13.06.12 Time: 14:55
 */

public class BaseManager
{
    private static boolean initialized = false;

    public static void initialize ()
    {
        if ( !initialized )
        {
            initialized = true;

            // Настройки хранения данных
            SettingsManager.setDefaultSettingsDirName ( ".tradeHelper" );
            SettingsManager.setDefaultSettingsGroup ( "ApplicationSettings" );
            SettingsManager.setSaveOnChange ( true );

            // Настройки сериализации данных
            XmlUtils.processAnnotations ( TrackerPage.class );
            XmlUtils.processAnnotations ( ServerType.class );
            XmlUtils.processAnnotations ( RagData.class );
            XmlUtils.processAnnotations ( Item.class );
            XmlUtils.processAnnotations ( ItemType.class );
            XmlUtils.processAnnotations ( ItemClass.class );
            XmlUtils.processAnnotations ( DropType.class );
            XmlUtils.processAnnotations ( MobDrop.class );
            XmlUtils.processAnnotations ( SynonymData.class );
            XmlUtils.processAnnotations ( Synonym.class );
            XmlUtils.processAnnotations ( User.class );
            XmlUtils.processAnnotations ( SingleTopicData.class );
            XmlUtils.processAnnotations ( ForumType.class );
            XmlUtils.processAnnotations ( TopicType.class );
            XmlUtils.processAnnotations ( ItemData.class );
            XmlUtils.processAnnotations ( Updates.class );
            XmlUtils.processAnnotations ( NewsData.class );
            XmlUtils.processAnnotations ( SingleNews.class );
            XmlUtils.processAnnotations ( NewsType.class );
        }
    }
}